/**********************************************
Figure D4: Survey Experiment Randomization Check
***********************************************/

preserve
yougov

qui reg treat $cfexp , r
estimate store randcheck
coefplot randcheck, drop (_cons) xline(0, lcolor(red) lstyle(solid)) msymbol(circle)  ///
  legend(off) mfcolor(black) mlcolor (white) msize(medium) ///
 ciopts(lpatt(solid)lcol(black)) xtitle("Randomization Check") ///
 coeflabels(1.anyUniW19 ="High Educ Enrol" 2.anyUniW19 ="High Educ Not Finished" 3.anyUniW19 = "High Educ Grad" ///
  2.wkstat ="Unemployed" 3.wkstat ="Student" 4.wkstat ="Retired" 5.wkstat ="Not in Paid Work"   /// 
  female = "Female")

 graph export "$output/figd41.pdf",  replace
 
qui reg risktreat $cfexp , r
estimate store randcheckrisk
coefplot randcheckrisk, drop (_cons) xline(0, lcolor(red) lstyle(solid)) msymbol(circle)  ///
  legend(off) mfcolor(black) mlcolor (white) msize(medium) ///
 ciopts(lpatt(solid)lcol(black)) xtitle("Randomization Check") ///
 coeflabels(1.anyUniW19 ="High Educ Enrol" 2.anyUniW19 ="High Educ Not Finished" 3.anyUniW19 = "High Educ Grad" ///
  2.wkstat ="Unemployed" 3.wkstat ="Student" 4.wkstat ="Retired" 5.wkstat ="Not in Paid Work"   /// 
  female = "Female")

 graph export "$output/figd42.pdf",  replace

restore
